Skip to content

feat(react-native): record automatic exception steps - #4573

Open
jakesciotto wants to merge 6 commits into
mainfrom
feat/rn-automatic-exception-steps
Open

feat(react-native): record automatic exception steps#4573
jakesciotto wants to merge 6 commits into
mainfrom
feat/rn-automatic-exception-steps

Conversation

@jakesciotto

@jakesciotto jakesciotto commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Refs PostHog/posthog#43989, the public request for Sentry-style breadcrumbs. That issue asks for them in the browser SDK, so this does not close it.

Problem

addExceptionStep shipped in posthog-react-native 4.50.0 (#3861), and it does what the docs promise. But every step is manual, so an exception carries a timeline only where somebody remembered to add a call. Bugsnag and Sentry leave breadcrumbs for navigation, network requests, taps and lifecycle on their own, so a crash arrives with a trail even in code nobody instrumented.

No PostHog SDK records a step automatically today. I checked posthog-js, posthog-ios, posthog-android and posthog-flutter: addExceptionStep is a public API in each, and nothing calls it internally.

This came from a React Native customer who asked for the Bugsnag Breadcrumbs equivalent, found the manual API, and said the manual calls feel like the part they would forget.

What this does

Set errorTracking.exceptionSteps.automatic to record a step for a signal the SDK already observes:

const posthog = new PostHog('<token>', {
  errorTracking: {
    exceptionSteps: {
      automatic: true, // or { navigation: true, taps: true, lifecycle: true }
    },
  },
})
Signal Source event Step
navigation $screen Screen: Cart, $type: navigation
taps $autocapture (touch) Tap: CheckoutButton, $type: tap
lifecycle Application Opened and the other four Application Backgrounded, $type: lifecycle

Every signal is off by default. Each step adds bytes to every captured exception, so this is opt-in, which also matches errorTracking.autocapture.

How it works

The recorder hangs off the existing processBeforeEnqueue chokepoint in posthog-rn.ts, which already sees $screen, $autocapture and the lifecycle events. Nothing new is patched or wrapped. The mapping itself is a pure function, so it is testable without the SDK.

Automatic steps share the byte-bounded buffer and the native forwarding that manual steps use, so a native crash carries the same timeline.

Decisions worth a look

  1. $type on the wire. The error tracking UI already reads $type and $level per step (frontend/src/lib/components/Errors/exceptionStepsValidation.ts) and renders $type as the secondary line in the session timeline, but no SDK emits either one. This adds both to EXCEPTION_STEP_INTERNAL_FIELDS in @posthog/core to match that contract. Neither becomes reserved, so a caller can still categorise a manual step by hand.
  2. A manual step stays untyped. Stamping $type: 'manual' would put a new label next to every existing step for every current user, so only automatic steps carry $type.
  3. A dropped event leaves no step. A caller drops an event in before_send to keep data out of PostHog. Resurrecting it inside an exception payload would defeat that, so only a surviving event records a step.
  4. A tap step carries neither $el_text nor coordinates. Element text is user-visible copy that can hold personal data, and the label from tag_name is either a ph-label or a component display name.
  5. The config type and resolver live in @posthog/core, not in the RN package, so iOS, Android and web can adopt the same shape and the same $type vocabulary. Only React Native reads it today.

Not in this PR

  • Network request steps. Bugsnag's request breadcrumb is the notable remaining gap. It needs request interception, and the RN SDK patches only fetch, not XMLHttpRequest, so an axios default would go unrecorded. That deserves its own change.
  • Console steps. Console output already has two homes in this SDK: errorTracking.autocapture.console and the Logs product. A third path would be redundant.
  • Docs. posthog.com/docs/error-tracking/capture needs an automatic-steps section. Happy to follow with that PR once the config shape is settled here.

Testing

  • 41 tests across the exception step specs, 626 across the whole React Native package, all passing.
  • New: exception-steps-automatic.spec.ts covers the mapping and the buffer wiring; exception-steps-automatic-capture.spec.ts drives a live client through ready() so the assertions run through the real enqueue path rather than a mocked one.
  • automatic-steps.ts is at 100% statement coverage.
  • Core: resolveAutomaticExceptionStepsConfig and the $type/$level strip behavior are covered; the full core suite passes (845).
  • Three failures in the browser package (persistence-key-policy, module.test.ts, and a playwright spec run under jest) reproduce on a clean main with these changes stashed, so they are unrelated.
  • errorTracking.exceptionSteps.automatic: true is wired into example-expo-53 for manual verification: switch tabs, tap a button, background the app, then capture an exception and read the timeline.

🤖 Generated with Claude Code

@jakesciotto
jakesciotto requested a review from a team as a code owner August 19, 2026 19:11
Comment thread packages/react-native/src/error-tracking/index.ts Outdated
@veria-ai

veria-ai Bot commented Aug 19, 2026

Copy link
Copy Markdown

PR overview

This pull request adds automatic exception-step recording to the React Native SDK, capturing recent screen and tap context for exception events.

One low-impact privacy issue remains: resetting the active identity does not clear buffered exception steps, so a later user on the same device could report the previous user’s recent activity under the new identity. One other issue has already been addressed, and clearing this buffer during reset would resolve the remaining concern.

Open issues (1)

Fixed/addressed: 1 · PR risk: 4/10

@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(react-native): record automatic exc..." | Re-trigger Greptile

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

posthog-node Compliance Report

Date: 2026-08-30 23:11:10 UTC
Duration: 198226ms

✅ All Tests Passed!

111/111 tests passed


Capture_V1 Tests

94/94 tests passed

View Details
Test Status Duration
Endpoint And Method.Targets V1 Endpoint 96ms
Endpoint And Method.Does Not Use Legacy Endpoints 14ms
Required Headers.Has Authorization Bearer Header 11ms
Required Headers.Has Content Type Json 12ms
Required Headers.Has Posthog Sdk Info Format 10ms
Required Headers.Has Posthog Attempt Header 11ms
Required Headers.Has Posthog Request Id 10ms
Required Headers.Has Posthog Request Timestamp 10ms
Required Headers.Has User Agent 12ms
Body Format.Body Has Created At And Batch 9ms
Body Format.No Api Key In Body 9ms
Body Format.No Sent At In Body 8ms
Event Format.Event Has Required Root Fields 8ms
Event Format.Event Uuid Is Valid 8ms
Event Format.Event Timestamp Is Rfc3339 8ms
Event Format.Distinct Id Is String 7ms
Event Format.Distinct Id At Root Not Properties 8ms
Event Format.Custom Properties Preserved 7ms
Event Format.Set Properties Preserved 7ms
Event Format.Set Once Properties Preserved 7ms
Event Format.Groups Properties Preserved 8ms
Event Format.Sdk Generates Uuid If Not Provided 8ms
Event Format.Event Has Required Root Fields Batch 11ms
Event Format.Event Uuid Is Valid Batch 11ms
Event Format.Event Timestamp Is Rfc3339 Batch 11ms
Event Format.Distinct Id Is String Batch 10ms
Event Format.Distinct Id At Root Not Properties Batch 12ms
Event Format.Custom Properties Preserved Batch 10ms
Event Format.Set Properties Preserved Batch 14ms
Event Format.Set Once Properties Preserved Batch 15ms
Event Format.Groups Properties Preserved Batch 10ms
Event Format.Sdk Generates Uuid If Not Provided Batch 10ms
Batch Behavior.Multiple Events In Single Batch 14ms
Batch Behavior.Batch Envelope Smoke 12ms
Batch Behavior.Flush With No Events Sends Nothing 4ms
Batch Behavior.Flush At Triggers Batch 1008ms
Batch Behavior.Created At Reflects Batch Creation Time 9ms
Deduplication.Generates Unique Uuids 16ms
Deduplication.Different Events Same Content Different Uuids 9ms
Deduplication.Preserves Uuid On Retry 6018ms
Deduplication.Preserves Timestamp On Retry 6021ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 6022ms
Deduplication.No Duplicate Events In Batch 15ms
Header Behavior On Retry.Attempt Header Starts At One 7ms
Header Behavior On Retry.Attempt Header Increments On Retry 12017ms
Header Behavior On Retry.Request Id Preserved On Retry 6020ms
Header Behavior On Retry.Different Requests Have Different Request Ids 2017ms
Header Behavior On Retry.Request Timestamp Changes On Retry 6021ms
Response Format Validation.Success Response Has Uuid Keyed Results 9ms
Response Format Validation.Success Response Has Ok For Each Event 10ms
Response Format Validation.Success No Retry After When All Ok 10ms
Response Format Validation.Success Retry After Present When Retry Events 1013ms
Response Format Validation.Success No Retry After When Drop Only 11ms
Response Format Validation.Response Echoes Request Id 8ms
Retry Behavior.Retries On 408 6018ms
Retry Behavior.Retries On 500 6026ms
Retry Behavior.Retries On 503 7021ms
Retry Behavior.Retries On 504 6019ms
Retry Behavior.Retryable Errors Have Retry After 3016ms
Retry Behavior.Respects Retry After On Retryable Error 11021ms
Retry Behavior.Does Not Retry On 400 2013ms
Retry Behavior.Does Not Retry On 401 2013ms
Retry Behavior.Does Not Retry On 402 2011ms
Retry Behavior.Does Not Retry On 413 2013ms
Retry Behavior.Does Not Retry On 415 2011ms
Retry Behavior.Non Retryable Errors Have No Retry After 2012ms
Retry Behavior.Implements Backoff 18037ms
Retry Behavior.Max Retries Respected 18041ms
Partial Batch Handling.Handles 200 Full Success 2011ms
Partial Batch Handling.Handles 200 With All Ok 3017ms
Partial Batch Handling.Does Not Retry Dropped Events 3015ms
Partial Batch Handling.Does Not Retry Limited Events 3015ms
Partial Batch Handling.Prunes Ok Events On Partial Retry 6020ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry 6019ms
Partial Batch Handling.Retries Only Retry Events From Partial 6022ms
Partial Batch Handling.Partial Retry Preserves Uuids 6022ms
Partial Batch Handling.Partial Retry Attempt Header Increments 6022ms
Partial Batch Handling.Partial Retry Request Id Preserved 6015ms
Partial Batch Handling.Respects Retry After On Partial 8021ms
Partial Batch Handling.Unknown Result Treated As Terminal 3014ms
Partial Batch Handling.Mixed Ok Drop Limited No Retry 3016ms
Compression.Sends Gzip Content Encoding 9ms
Compression.No Content Encoding When Disabled 7ms
Compression.Compressed Body Is Decompressible 7ms
Error Handling.Does Not Retry On Unknown 4Xx 2011ms
Event Options.Cookieless Mode Override 10ms
Event Options.Disable Skew Correction Override 7ms
Event Options.Process Person Profile Override 8ms
Event Options.Product Tour Id Override 8ms
Event Options.Unset Options Omitted 7ms
Event Options.Options Override In Batch 10ms
Geoip And Historical Migration.Geoip Disable Injected Into Properties 8ms
Geoip And Historical Migration.Historical Migration Set In Body 7ms
Geoip And Historical Migration.Historical Migration Absent By Default 7ms

Feature_Flags Tests

17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 12ms
Request Payload.Flags Request Uses V2 Query Param 10ms
Request Payload.Flags Request Hits Flags Path Not Decide 8ms
Request Payload.Flags Request Omits Authorization Header 10ms
Request Payload.Token In Flags Body Matches Init 9ms
Request Payload.Groups Round Trip 8ms
Request Payload.Groups Default To Empty Object 9ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 10ms
Request Payload.Disable Geoip Omitted Defaults To False 9ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key 8ms
Request Lifecycle.No Flags Request On Init Alone 4ms
Request Lifecycle.No Flags Request On Normal Capture 7ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 12ms
Request Lifecycle.Mock Response Value Is Returned To Caller 9ms
Retry Behavior.Retries Flags On 502 264ms
Retry Behavior.Retries Flags On 504 263ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 10ms

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

posthog-js Compliance Report

Date: 2026-08-30 23:18:51 UTC
Duration: 88899ms

✅ All Tests Passed!

26/26 tests passed


Capture Tests

26/26 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields Client 125ms
Format Validation.Event Has Uuid 21ms
Format Validation.Event Has Lib Properties 17ms
Format Validation.Distinct Id Is String Client 17ms
Format Validation.Token Is Present Client 18ms
Format Validation.Custom Properties Preserved 16ms
Format Validation.Event Has Timestamp 17ms
Retry Behavior.Retries On 503 5017ms
Retry Behavior.Does Not Retry On 400 2019ms
Retry Behavior.Does Not Retry On 401 2018ms
Retry Behavior.Respects Retry After Header 5017ms
Retry Behavior.Implements Backoff 15030ms
Retry Behavior.Retries On 500 5016ms
Retry Behavior.Retries On 502 5014ms
Retry Behavior.Retries On 504 5021ms
Retry Behavior.Max Retries Respected 15028ms
Deduplication.Generates Unique Uuids 26ms
Deduplication.Preserves Uuid On Retry 5019ms
Deduplication.Preserves Uuid And Timestamp On Retry 10023ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 5024ms
Deduplication.No Duplicate Events In Batch 22ms
Deduplication.Different Events Have Different Uuids 14ms
Batch Format.Flush With No Events Sends Nothing 7ms
Error Handling.Does Not Retry On 403 2014ms
Error Handling.Does Not Retry On 413 2013ms
Error Handling.Retries On 408 5018ms

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Size Change: +2 kB (+0.01%)

Total Size: 20.7 MB

📦 View Changed
Filename Size Change
packages/core/dist/error-tracking/exception-steps.js 6.03 kB +19 B (+0.32%)
packages/core/dist/error-tracking/exception-steps.mjs 3.86 kB +19 B (+0.5%)
packages/react-native/dist/error-tracking/index.js 11.7 kB +1.7 kB (+17.04%) ⚠️
packages/react-native/dist/posthog-rn.js 67.7 kB +260 B (+0.39%)
ℹ️ View Unchanged
Filename Size Change
packages/ai/dist/anthropic/index.cjs 41.3 kB 0 B
packages/ai/dist/anthropic/index.mjs 41 kB 0 B
packages/ai/dist/gemini/index.cjs 40.9 kB 0 B
packages/ai/dist/gemini/index.mjs 40.8 kB 0 B
packages/ai/dist/index.cjs 63.4 kB 0 B
packages/ai/dist/index.mjs 63.3 kB 0 B
packages/ai/dist/langchain/index.cjs 42.8 kB 0 B
packages/ai/dist/langchain/index.mjs 42.7 kB 0 B
packages/ai/dist/langchain/middleware/index.cjs 49.5 kB 0 B
packages/ai/dist/langchain/middleware/index.mjs 49.4 kB 0 B
packages/ai/dist/openai-agents/index.cjs 31.8 kB 0 B
packages/ai/dist/openai-agents/index.mjs 31.7 kB 0 B
packages/ai/dist/openai/index.cjs 93.3 kB 0 B
packages/ai/dist/openai/index.mjs 92.9 kB 0 B
packages/ai/dist/otel/index.cjs 18.4 kB 0 B
packages/ai/dist/otel/index.mjs 18.3 kB 0 B
packages/ai/dist/vercel/index.cjs 53.5 kB 0 B
packages/ai/dist/vercel/index.mjs 53.5 kB 0 B
packages/browser-common/dist/client.js 603 B 0 B
packages/browser-common/dist/client.mjs 0 B 0 B 🆕
packages/browser-common/dist/config.js 1.43 kB 0 B
packages/browser-common/dist/config.mjs 223 B 0 B
packages/browser-common/dist/constants.js 1.66 kB 0 B
packages/browser-common/dist/constants.mjs 219 B 0 B
packages/browser-common/dist/disposable.js 1.63 kB 0 B
packages/browser-common/dist/disposable.mjs 386 B 0 B
packages/browser-common/dist/extension-runtime.js 3.07 kB 0 B
packages/browser-common/dist/extension-runtime.mjs 1.83 kB 0 B
packages/browser-common/dist/extension.js 603 B 0 B
packages/browser-common/dist/extension.mjs 0 B 0 B 🆕
packages/browser-common/dist/index.js 3.08 kB 0 B
packages/browser-common/dist/index.mjs 170 B 0 B
packages/browser-common/dist/persistence.js 603 B 0 B
packages/browser-common/dist/persistence.mjs 0 B 0 B 🆕
packages/browser-common/dist/pubsub.js 2.53 kB 0 B
packages/browser-common/dist/pubsub.mjs 1.35 kB 0 B
packages/browser-common/dist/token.js 603 B 0 B
packages/browser-common/dist/token.mjs 0 B 0 B 🆕
packages/browser-common/dist/types/compression.js 1.28 kB 0 B
packages/browser-common/dist/types/compression.mjs 93 B 0 B
packages/browser-common/dist/types/index.js 4.11 kB 0 B
packages/browser-common/dist/types/index.mjs 144 B 0 B
packages/browser-common/dist/types/network-recording.js 603 B 0 B
packages/browser-common/dist/types/network-recording.mjs 0 B 0 B 🆕
packages/browser-common/dist/types/remote-config.js 603 B 0 B
packages/browser-common/dist/types/remote-config.mjs 0 B 0 B 🆕
packages/browser-common/dist/types/surveys.js 4.55 kB 0 B
packages/browser-common/dist/types/surveys.mjs 2.17 kB 0 B
packages/browser-common/dist/utils/array-at-********.js 628 B 0 B
packages/browser-common/dist/utils/array-at-********.mjs 425 B 0 B
packages/browser-common/dist/utils/autocapture-utils.js 24.1 kB 0 B
packages/browser-common/dist/utils/autocapture-utils.mjs 18.5 kB 0 B
packages/browser-common/dist/utils/blocked-uas.js 2.1 kB 0 B
packages/browser-common/dist/utils/blocked-uas.mjs 598 B 0 B
packages/browser-common/dist/utils/cookie-utils.js 1.89 kB 0 B
packages/browser-common/dist/utils/cookie-utils.mjs 673 B 0 B
packages/browser-common/dist/utils/device-model-utils.js 1.98 kB 0 B
packages/browser-common/dist/utils/device-model-utils.mjs 678 B 0 B
packages/browser-common/dist/utils/element-utils.js 2.46 kB 0 B
packages/browser-common/dist/utils/element-utils.mjs 804 B 0 B
packages/browser-common/dist/utils/elements-chain-utils.js 2.77 kB 0 B
packages/browser-common/dist/utils/elements-chain-utils.mjs 1.23 kB 0 B
packages/browser-common/dist/utils/encode-utils.js 1.4 kB 0 B
packages/browser-common/dist/utils/encode-utils.mjs 205 B 0 B
packages/browser-common/dist/utils/event-utils.js 15.7 kB 0 B
packages/browser-common/dist/utils/event-utils.mjs 10 kB 0 B
packages/browser-common/dist/utils/general-utils.js 7.31 kB 0 B
packages/browser-common/dist/utils/general-utils.mjs 4.49 kB 0 B
packages/browser-common/dist/utils/globals.js 2.78 kB 0 B
packages/browser-common/dist/utils/globals.mjs 860 B 0 B
packages/browser-common/dist/utils/logger.js 3.4 kB 0 B
packages/browser-common/dist/utils/logger.mjs 1.61 kB 0 B
packages/browser-common/dist/utils/matcher-utils.js 2.85 kB 0 B
packages/browser-common/dist/utils/matcher-utils.mjs 1.33 kB 0 B
packages/browser-common/dist/utils/promise-utils.js 1.36 kB 0 B
packages/browser-common/dist/utils/promise-utils.mjs 169 B 0 B
packages/browser-common/dist/utils/property-utils.js 3.53 kB 0 B
packages/browser-common/dist/utils/property-utils.mjs 1.6 kB 0 B
packages/browser-common/dist/utils/prototype-utils.js 3.51 kB 0 B
packages/browser-common/dist/utils/prototype-utils.mjs 1.86 kB 0 B
packages/browser-common/dist/utils/regex-utils.js 1.45 kB 0 B
packages/browser-common/dist/utils/regex-utils.mjs 113 B 0 B
packages/browser-common/dist/utils/request-utils.js 6.73 kB 0 B
packages/browser-common/dist/utils/request-utils.mjs 4.19 kB 0 B
packages/browser-common/dist/utils/simple-event-emitter.js 1.76 kB 0 B
packages/browser-common/dist/utils/simple-event-emitter.mjs 553 B 0 B
packages/browser-common/dist/utils/stylesheet-loader.js 2.13 kB 0 B
packages/browser-common/dist/utils/stylesheet-loader.mjs 823 B 0 B
packages/browser-common/dist/utils/type-utils.js 1.59 kB 0 B
packages/browser-common/dist/utils/type-utils.mjs 267 B 0 B
packages/browser-common/dist/utils/url-targeting-utils.js 2.35 kB 0 B
packages/browser-common/dist/utils/url-targeting-utils.mjs 863 B 0 B
packages/browser-common/dist/utils/uuidv7.js 6.66 kB 0 B
packages/browser-common/dist/utils/uuidv7.mjs 5.18 kB 0 B
packages/browser-next/dist/analytics-********.js 1.58 kB 0 B
packages/browser-next/dist/analytics-********.mjs 219 B 0 B
packages/browser-next/dist/analytics-options.js 603 B 0 B
packages/browser-next/dist/analytics-options.mjs 0 B 0 B 🆕
packages/browser-next/dist/analytics.js 6.52 kB 0 B
packages/browser-next/dist/analytics.mjs 5.15 kB 0 B
packages/browser-next/dist/bot-filter.js 2.28 kB 0 B
packages/browser-next/dist/bot-filter.mjs 1.09 kB 0 B
packages/browser-next/dist/capture-v1.js 27.7 kB 0 B
packages/browser-next/dist/capture-v1.mjs 25.3 kB 0 B
packages/browser-next/dist/core.js 1.59 kB 0 B
packages/browser-next/dist/core.mjs 194 B 0 B
packages/browser-next/dist/extensions/registry.js 3.32 kB 0 B
packages/browser-next/dist/extensions/registry.mjs 2.11 kB 0 B
packages/browser-next/dist/id.js 2.15 kB 0 B
packages/browser-next/dist/id.mjs 983 B 0 B
packages/browser-next/dist/index.js 3.38 kB 0 B
packages/browser-next/dist/index.mjs 1.19 kB 0 B
packages/browser-next/dist/lane.js 18 kB 0 B
packages/browser-next/dist/lane.mjs 16.9 kB 0 B
packages/browser-next/dist/logger.js 1.77 kB 0 B
packages/browser-next/dist/logger.mjs 581 B 0 B
packages/browser-next/dist/posthog.js 33.1 kB 0 B
packages/browser-next/dist/posthog.mjs 30.9 kB 0 B
packages/browser-next/dist/rate-limiter.js 2.79 kB 0 B
packages/browser-next/dist/rate-limiter.mjs 1.58 kB 0 B
packages/browser-next/dist/request.js 4.52 kB 0 B
packages/browser-next/dist/request.mjs 3.21 kB 0 B
packages/browser-next/dist/state.js 24.8 kB 0 B
packages/browser-next/dist/state.mjs 23.2 kB 0 B
packages/browser-next/dist/types.js 603 B 0 B
packages/browser-next/dist/types.mjs 0 B 0 B 🆕
packages/browser-next/dist/version.js 1.21 kB 0 B
packages/browser-next/dist/version.mjs 45 B 0 B
packages/browser/dist/all-external-dependencies.js 379 kB 0 B
packages/browser/dist/array.full.es5.js 480 kB 0 B
packages/browser/dist/array.full.js 611 kB 0 B
packages/browser/dist/array.full.no-********.js 665 kB 0 B
packages/browser/dist/array.js 269 kB 0 B
packages/browser/dist/array.no-********.js 305 kB 0 B
packages/browser/dist/conversations.js 68.2 kB 0 B
packages/browser/dist/crisp-chat-integration.js 2.03 kB 0 B
packages/browser/dist/customizations.full.js 15.9 kB 0 B
packages/browser/dist/customizations.js 15.8 kB 0 B
packages/browser/dist/dead-clicks-autocapture.js 18.3 kB 0 B
packages/browser/dist/default-extensions.js 267 kB 0 B
packages/browser/dist/element-inference.js 5.62 kB 0 B
packages/browser/dist/exception-autocapture.js 13.6 kB 0 B
packages/browser/dist/extension-bundles.js 151 kB 0 B
packages/browser/dist/external-scripts-loader.js 3.6 kB 0 B
packages/browser/dist/intercom-integration.js 2.08 kB 0 B
packages/browser/dist/lazy-********.js 202 kB 0 B
packages/browser/dist/logs.js 5.83 kB 0 B
packages/browser/dist/main.js 274 kB 0 B
packages/browser/dist/module.full.js 614 kB 0 B
packages/browser/dist/module.full.no-********.js 667 kB 0 B
packages/browser/dist/module.js 273 kB 0 B
packages/browser/dist/module.no-********.js 309 kB 0 B
packages/browser/dist/module.slim.js 133 kB 0 B
packages/browser/dist/module.slim.no-********.js 144 kB 0 B
packages/browser/dist/posthog-********.js 202 kB 0 B
packages/browser/dist/product-tours-preview.js 82.4 kB 0 B
packages/browser/dist/product-tours.js 124 kB 0 B
packages/browser/dist/recorder-v2.js 126 kB 0 B
packages/browser/dist/recorder.js 126 kB 0 B
packages/browser/dist/rrweb-plugin-console-record.js 7.05 kB 0 B
packages/browser/dist/rrweb-types.js 2.33 kB 0 B
packages/browser/dist/rrweb.js 318 kB 0 B
packages/browser/dist/surveys-preview.js 81.5 kB 0 B
packages/browser/dist/surveys.js 103 kB 0 B
packages/browser/dist/tracing-headers.js 3.76 kB 0 B
packages/browser/dist/web-vitals-soft-navs.js 9.9 kB 0 B
packages/browser/dist/web-vitals-with-attribution-soft-navs.js 25.1 kB 0 B
packages/browser/dist/web-vitals-with-attribution.js 18.4 kB 0 B
packages/browser/dist/web-vitals.js 6.91 kB 0 B
packages/browser/react/dist/esm/index.js 22.5 kB 0 B
packages/browser/react/dist/esm/slim/index.js 18.9 kB 0 B
packages/browser/react/dist/esm/surveys/index.js 4.75 kB 0 B
packages/browser/react/dist/umd/index.js 25.9 kB 0 B
packages/browser/react/dist/umd/slim/index.js 21.8 kB 0 B
packages/browser/react/dist/umd/surveys/index.js 5.52 kB 0 B
packages/convex/dist/client/feature-flags/crypto.js 76 B 0 B
packages/convex/dist/client/feature-flags/evaluator.js 14.9 kB 0 B
packages/convex/dist/client/feature-flags/index.js 196 B 0 B
packages/convex/dist/client/feature-flags/match-********.js 5.08 kB 0 B
packages/convex/dist/client/feature-flags/types.js 44 B 0 B
packages/convex/dist/client/index.js 14.8 kB 0 B
packages/convex/dist/component/_generated/api.js 712 B 0 B
packages/convex/dist/component/_generated/component.js 212 B 0 B
packages/convex/dist/component/_generated/dataModel.js 230 B 0 B
packages/convex/dist/component/_generated/server.js 3.74 kB 0 B
packages/convex/dist/component/convex.config.js 1.66 kB 0 B
packages/convex/dist/component/crons.js 969 B 0 B
packages/convex/dist/component/lib.js 24.8 kB 0 B
packages/convex/dist/component/schema.js 1.17 kB 0 B
packages/convex/dist/component/version.js 67 B 0 B
packages/core/dist/cookie.js 5.34 kB 0 B
packages/core/dist/cookie.mjs 3.12 kB 0 B
packages/core/dist/error-tracking/chunk-ids.js 2.54 kB 0 B
packages/core/dist/error-tracking/chunk-ids.mjs 1.31 kB 0 B
packages/core/dist/error-tracking/coercers/dom-exception-coercer.js 2.3 kB 0 B
packages/core/dist/error-tracking/coercers/dom-exception-coercer.mjs 993 B 0 B
packages/core/dist/error-tracking/coercers/error-coercer.js 2.13 kB 0 B
packages/core/dist/error-tracking/coercers/error-coercer.mjs 888 B 0 B
packages/core/dist/error-tracking/coercers/error-event-coercer.js 2.37 kB 0 B
packages/core/dist/error-tracking/coercers/error-event-coercer.mjs 1.07 kB 0 B
packages/core/dist/error-tracking/coercers/event-coercer.js 1.82 kB 0 B
packages/core/dist/error-tracking/coercers/event-coercer.mjs 548 B 0 B
packages/core/dist/error-tracking/coercers/index.js 6.79 kB 0 B
packages/core/dist/error-tracking/coercers/index.mjs 326 B 0 B
packages/core/dist/error-tracking/coercers/object-coercer.js 4.04 kB 0 B
packages/core/dist/error-tracking/coercers/object-coercer.mjs 2.53 kB 0 B
packages/core/dist/error-tracking/coercers/primitive-coercer.js 1.67 kB 0 B
packages/core/dist/error-tracking/coercers/primitive-coercer.mjs 419 B 0 B
packages/core/dist/error-tracking/coercers/promise-rejection-event.js 2.59 kB 0 B
packages/core/dist/error-tracking/coercers/promise-rejection-event.mjs 1.25 kB 0 B
packages/core/dist/error-tracking/coercers/string-coercer.js 2.01 kB 0 B
packages/core/dist/error-tracking/coercers/string-coercer.mjs 820 B 0 B
packages/core/dist/error-tracking/coercers/utils.js 2.06 kB 0 B
packages/core/dist/error-tracking/coercers/utils.mjs 716 B 0 B
packages/core/dist/error-tracking/error-properties-builder.js 5.56 kB 0 B
packages/core/dist/error-tracking/error-properties-builder.mjs 4.23 kB 0 B
packages/core/dist/error-tracking/index.js 5.32 kB 0 B
packages/core/dist/error-tracking/index.mjs 222 B 0 B
packages/core/dist/error-tracking/parsers/base.js 2 kB 0 B
packages/core/dist/error-tracking/parsers/base.mjs 627 B 0 B
packages/core/dist/error-tracking/parsers/chrome.js 2.73 kB 0 B
packages/core/dist/error-tracking/parsers/chrome.mjs 1.32 kB 0 B
packages/core/dist/error-tracking/parsers/gecko.js 2.47 kB 0 B
packages/core/dist/error-tracking/parsers/gecko.mjs 1.13 kB 0 B
packages/core/dist/error-tracking/parsers/index.js 4.75 kB 0 B
packages/core/dist/error-tracking/parsers/index.mjs 2.1 kB 0 B
packages/core/dist/error-tracking/parsers/node.js 4.21 kB 0 B
packages/core/dist/error-tracking/parsers/node.mjs 2.95 kB 0 B
packages/core/dist/error-tracking/parsers/opera.js 2.26 kB 0 B
packages/core/dist/error-tracking/parsers/opera.mjs 746 B 0 B
packages/core/dist/error-tracking/parsers/safari.js 1.88 kB 0 B
packages/core/dist/error-tracking/parsers/safari.mjs 574 B 0 B
packages/core/dist/error-tracking/parsers/winjs.js 1.72 kB 0 B
packages/core/dist/error-tracking/parsers/winjs.mjs 426 B 0 B
packages/core/dist/error-tracking/release.js 1.42 kB 0 B
packages/core/dist/error-tracking/release.mjs 203 B 0 B
packages/core/dist/error-tracking/types.js 1.33 kB 0 B
packages/core/dist/error-tracking/types.mjs 131 B 0 B
packages/core/dist/error-tracking/utils.js 1.8 kB 0 B
packages/core/dist/error-tracking/utils.mjs 604 B 0 B
packages/core/dist/eventemitter.js 1.78 kB 0 B
packages/core/dist/eventemitter.mjs 571 B 0 B
packages/core/dist/featureFlagLocalEvaluation.js 15.3 kB 0 B
packages/core/dist/featureFlagLocalEvaluation.mjs 12.8 kB 0 B
packages/core/dist/featureFlagUtils.js 8.52 kB 0 B
packages/core/dist/featureFlagUtils.mjs 5.48 kB 0 B
packages/core/dist/gzip.js 5.79 kB 0 B
packages/core/dist/gzip.mjs 3.87 kB 0 B
packages/core/dist/index.js 23.2 kB 0 B
packages/core/dist/index.mjs 2.47 kB 0 B
packages/core/dist/logs/index.js 10.8 kB 0 B
packages/core/dist/logs/index.mjs 9.17 kB 0 B
packages/core/dist/logs/logs-utils.js 12.4 kB 0 B
packages/core/dist/logs/logs-utils.mjs 9.71 kB 0 B
packages/core/dist/logs/types.js 603 B 0 B
packages/core/dist/logs/types.mjs 0 B 0 B 🆕
packages/core/dist/metrics/config.js 1.95 kB 0 B
packages/core/dist/metrics/config.mjs 735 B 0 B
packages/core/dist/metrics/index.js 14.4 kB 0 B
packages/core/dist/metrics/index.mjs 12 kB 0 B
packages/core/dist/metrics/metrics-utils.js 3.86 kB 0 B
packages/core/dist/metrics/metrics-utils.mjs 1.97 kB 0 B
packages/core/dist/metrics/types.js 603 B 0 B
packages/core/dist/metrics/types.mjs 0 B 0 B 🆕
packages/core/dist/posthog-core-stateless.js 46.9 kB 0 B
packages/core/dist/posthog-core-stateless.mjs 43.6 kB 0 B
packages/core/dist/posthog-core.js 49.5 kB 0 B
packages/core/dist/posthog-core.mjs 43.9 kB 0 B
packages/core/dist/surveys/activation.js 2.2 kB 0 B
packages/core/dist/surveys/activation.mjs 572 B 0 B
packages/core/dist/surveys/events.js 4.27 kB 0 B
packages/core/dist/surveys/events.mjs 2.05 kB 0 B
packages/core/dist/surveys/index.js 6.54 kB 0 B
packages/core/dist/surveys/index.mjs 1.4 kB 0 B
packages/core/dist/surveys/keys.js 1.7 kB 0 B
packages/core/dist/surveys/keys.mjs 350 B 0 B
packages/core/dist/surveys/property-********.js 3.69 kB 0 B
packages/core/dist/surveys/property-********.mjs 2.14 kB 0 B
packages/core/dist/surveys/translations.js 9.09 kB 0 B
packages/core/dist/surveys/translations.mjs 6.83 kB 0 B
packages/core/dist/surveys/validation.js 3.06 kB 0 B
packages/core/dist/surveys/validation.mjs 1.51 kB 0 B
packages/core/dist/testing/index.js 2.93 kB 0 B
packages/core/dist/testing/index.mjs 79 B 0 B
packages/core/dist/testing/PostHogCoreTestClient.js 3.24 kB 0 B
packages/core/dist/testing/PostHogCoreTestClient.mjs 1.83 kB 0 B
packages/core/dist/testing/test-utils.js 2.83 kB 0 B
packages/core/dist/testing/test-utils.mjs 1.15 kB 0 B
packages/core/dist/tracing-headers.js 3.38 kB 0 B
packages/core/dist/tracing-headers.mjs 2.08 kB 0 B
packages/core/dist/types.js 8.35 kB 0 B
packages/core/dist/types.mjs 5.23 kB 0 B
packages/core/dist/utils/bot-detection.js 3.28 kB 0 B
packages/core/dist/utils/bot-detection.mjs 1.96 kB 0 B
packages/core/dist/utils/browser-utils.js 1.48 kB 0 B
packages/core/dist/utils/browser-utils.mjs 182 B 0 B
packages/core/dist/utils/bucketed-rate-limiter.js 4.23 kB 0 B
packages/core/dist/utils/bucketed-rate-limiter.mjs 2.22 kB 0 B
packages/core/dist/utils/index.js 16.6 kB 0 B
packages/core/dist/utils/index.mjs 3.36 kB 0 B
packages/core/dist/utils/json-utils.js 6.67 kB 0 B
packages/core/dist/utils/json-utils.mjs 4.45 kB 0 B
packages/core/dist/utils/logger.js 2.58 kB 0 B
packages/core/dist/utils/logger.mjs 1.29 kB 0 B
packages/core/dist/utils/number-utils.js 3.32 kB 0 B
packages/core/dist/utils/number-utils.mjs 1.68 kB 0 B
packages/core/dist/utils/promise-queue.js 2.48 kB 0 B
packages/core/dist/utils/promise-queue.mjs 1.25 kB 0 B
packages/core/dist/utils/string-utils.js 3.73 kB 0 B
packages/core/dist/utils/string-utils.mjs 1.97 kB 0 B
packages/core/dist/utils/type-utils.js 7.43 kB 0 B
packages/core/dist/utils/type-utils.mjs 3.28 kB 0 B
packages/core/dist/utils/user-agent-utils.js 17.7 kB 0 B
packages/core/dist/utils/user-agent-utils.mjs 14.2 kB 0 B
packages/core/dist/vendor/uuidv7.js 8.3 kB 0 B
packages/core/dist/vendor/uuidv7.mjs 6.72 kB 0 B
packages/mcp/dist/extensions/analytics-parameters.js 6.53 kB 0 B
packages/mcp/dist/extensions/analytics-parameters.mjs 4.27 kB 0 B
packages/mcp/dist/extensions/capture.js 3.94 kB 0 B
packages/mcp/dist/extensions/capture.mjs 2.58 kB 0 B
packages/mcp/dist/extensions/client-********.js 6.23 kB 0 B
packages/mcp/dist/extensions/client-********.mjs 3.71 kB 0 B
packages/mcp/dist/extensions/compatibility.js 5.36 kB 0 B
packages/mcp/dist/extensions/compatibility.mjs 3.4 kB 0 B
packages/mcp/dist/extensions/constants.js 5.39 kB 0 B
packages/mcp/dist/extensions/constants.mjs 2.95 kB 0 B
packages/mcp/dist/extensions/context-parameters.js 2.75 kB 0 B
packages/mcp/dist/extensions/context-parameters.mjs 893 B 0 B
packages/mcp/dist/extensions/conversation-id.js 6.31 kB 0 B
packages/mcp/dist/extensions/conversation-id.mjs 3.58 kB 0 B
packages/mcp/dist/extensions/detect.js 3.77 kB 0 B
packages/mcp/dist/extensions/detect.mjs 1.49 kB 0 B
packages/mcp/dist/extensions/event-types.js 1.68 kB 0 B
packages/mcp/dist/extensions/event-types.mjs 459 B 0 B
packages/mcp/dist/extensions/exceptions.js 2.57 kB 0 B
packages/mcp/dist/extensions/exceptions.mjs 1.19 kB 0 B
packages/mcp/dist/extensions/headers.js 1.98 kB 0 B
packages/mcp/dist/extensions/headers.mjs 643 B 0 B
packages/mcp/dist/extensions/ids.js 2.01 kB 0 B
packages/mcp/dist/extensions/ids.mjs 637 B 0 B
packages/mcp/dist/extensions/instrument-********.js 4.92 kB 0 B
packages/mcp/dist/extensions/instrument-********.mjs 3.18 kB 0 B
packages/mcp/dist/extensions/instrument-highlevel.js 12.7 kB 0 B
packages/mcp/dist/extensions/instrument-highlevel.mjs 10.2 kB 0 B
packages/mcp/dist/extensions/instrumentation.js 27.8 kB 0 B
packages/mcp/dist/extensions/instrumentation.mjs 21.9 kB 0 B
packages/mcp/dist/extensions/intent.js 3.2 kB 0 B
packages/mcp/dist/extensions/intent.mjs 1.64 kB 0 B
packages/mcp/dist/extensions/internal.js 7.54 kB 0 B
packages/mcp/dist/extensions/internal.mjs 5.23 kB 0 B
packages/mcp/dist/extensions/lib-********.js 1.6 kB 0 B
packages/mcp/dist/extensions/lib-********.mjs 267 B 0 B
packages/mcp/dist/extensions/logger.js 1.72 kB 0 B
packages/mcp/dist/extensions/logger.mjs 380 B 0 B
packages/mcp/dist/extensions/mcp-********.js 4.68 kB 0 B
packages/mcp/dist/extensions/mcp-********.mjs 3.3 kB 0 B
packages/mcp/dist/extensions/mcp-sdk-compat.js 5.04 kB 0 B
packages/mcp/dist/extensions/mcp-sdk-compat.mjs 2.9 kB 0 B
packages/mcp/dist/extensions/model-parameters.js 3.49 kB 0 B
packages/mcp/dist/extensions/model-parameters.mjs 1.41 kB 0 B
packages/mcp/dist/extensions/output-instructions.js 6.11 kB 0 B
packages/mcp/dist/extensions/output-instructions.mjs 3.91 kB 0 B
packages/mcp/dist/extensions/posthog-events.js 11.7 kB 0 B
packages/mcp/dist/extensions/posthog-events.mjs 7.98 kB 0 B
packages/mcp/dist/extensions/posthog-mcp.js 6.94 kB 0 B
packages/mcp/dist/extensions/posthog-mcp.mjs 4.93 kB 0 B
packages/mcp/dist/extensions/request-headers.js 2.17 kB 0 B
packages/mcp/dist/extensions/request-headers.mjs 963 B 0 B
packages/mcp/dist/extensions/sanitization.js 4.49 kB 0 B
packages/mcp/dist/extensions/sanitization.mjs 2.86 kB 0 B
packages/mcp/dist/extensions/session-token.js 5.39 kB 0 B
packages/mcp/dist/extensions/session-token.mjs 3.62 kB 0 B
packages/mcp/dist/extensions/session.js 6.64 kB 0 B
packages/mcp/dist/extensions/session.mjs 4.12 kB 0 B
packages/mcp/dist/extensions/sink.js 4.37 kB 0 B
packages/mcp/dist/extensions/sink.mjs 2.67 kB 0 B
packages/mcp/dist/extensions/tools.js 3.51 kB 0 B
packages/mcp/dist/extensions/tools.mjs 1.63 kB 0 B
packages/mcp/dist/extensions/tracing-helpers.js 2.41 kB 0 B
packages/mcp/dist/extensions/tracing-helpers.mjs 772 B 0 B
packages/mcp/dist/extensions/transport-********.js 2.91 kB 0 B
packages/mcp/dist/extensions/transport-********.mjs 1.09 kB 0 B
packages/mcp/dist/extensions/truncation.js 11.5 kB 0 B
packages/mcp/dist/extensions/truncation.mjs 9.79 kB 0 B
packages/mcp/dist/index.js 8.78 kB 0 B
packages/mcp/dist/index.mjs 4.96 kB 0 B
packages/mcp/dist/types.js 603 B 0 B
packages/mcp/dist/types.mjs 0 B 0 B 🆕
packages/mcp/dist/version.js 1.21 kB 0 B
packages/mcp/dist/version.mjs 46 B 0 B
packages/next/dist/app/PostHogProvider.js 5.37 kB 0 B
packages/next/dist/client/ClientPostHogProvider.js 2.28 kB 0 B
packages/next/dist/client/hooks.js 172 B 0 B
packages/next/dist/client/PostHogPageView.js 1.76 kB 0 B
packages/next/dist/index.client.js 401 B 0 B
packages/next/dist/index.edge.js 570 B 0 B
packages/next/dist/index.js 554 B 0 B
packages/next/dist/index.react-server.js 420 B 0 B
packages/next/dist/middleware/postHogMiddleware.js 4.08 kB 0 B
packages/next/dist/pages.client.js 225 B 0 B
packages/next/dist/pages.edge.js 294 B 0 B
packages/next/dist/pages.js 347 B 0 B
packages/next/dist/pages/createPostHog.js 1.48 kB 0 B
packages/next/dist/pages/getServerSidePostHog.js 1.48 kB 0 B
packages/next/dist/pages/PostHogPageView.js 1.55 kB 0 B
packages/next/dist/pages/PostHogProvider.js 1.58 kB 0 B
packages/next/dist/server.edge.js 795 B 0 B
packages/next/dist/server/captureRequestError.js 5.26 kB 0 B
packages/next/dist/server/clientCache.edge.js 305 B 0 B
packages/next/dist/server/clientCache.js 1.54 kB 0 B
packages/next/dist/server/clientCache.node.js 305 B 0 B
packages/next/dist/server/createPostHog.js 1.44 kB 0 B
packages/next/dist/server/getPostHog.js 3.45 kB 0 B
packages/next/dist/server/onRequestError.js 1.39 kB 0 B
packages/next/dist/server/onRequestError.types.js 59 B 0 B
packages/next/dist/shared/browser.js 195 B 0 B
packages/next/dist/shared/config.js 2.23 kB 0 B
packages/next/dist/shared/constants.js 201 B 0 B
packages/next/dist/shared/cookie.js 540 B 0 B
packages/next/dist/shared/identity.js 2.56 kB 0 B
packages/next/dist/shared/tracing-headers.js 2.18 kB 0 B
packages/nextjs-config/dist/config.js 6.1 kB 0 B
packages/nextjs-config/dist/config.mjs 4.53 kB 0 B
packages/nextjs-config/dist/index.js 2.24 kB 0 B
packages/nextjs-config/dist/index.mjs 30 B 0 B
packages/nextjs-config/dist/strip-sourcemap-********.js 3.63 kB 0 B
packages/nextjs-config/dist/strip-sourcemap-********.mjs 1.77 kB 0 B
packages/nextjs-config/dist/utils.js 2.94 kB 0 B
packages/nextjs-config/dist/utils.mjs 826 B 0 B
packages/node/dist/ai-capture/batching.js 2.61 kB 0 B
packages/node/dist/ai-capture/batching.mjs 1.21 kB 0 B
packages/node/dist/ai-capture/routing.js 1.87 kB 0 B
packages/node/dist/ai-capture/routing.mjs 264 B 0 B
packages/node/dist/capture-v1/config.js 1.5 kB 0 B
packages/node/dist/capture-v1/config.mjs 292 B 0 B
packages/node/dist/capture-v1/errors.js 1.89 kB 0 B
packages/node/dist/capture-v1/errors.mjs 694 B 0 B
packages/node/dist/capture-v1/routing.js 1.68 kB 0 B
packages/node/dist/capture-v1/routing.mjs 279 B 0 B
packages/node/dist/capture-v1/sender.js 11.4 kB 0 B
packages/node/dist/capture-v1/sender.mjs 9.94 kB 0 B
packages/node/dist/capture-v1/transform.js 5.13 kB 0 B
packages/node/dist/capture-v1/transform.mjs 3.65 kB 0 B
packages/node/dist/capture-v1/types.js 603 B 0 B
packages/node/dist/capture-v1/types.mjs 0 B 0 B 🆕
packages/node/dist/client.js 59.5 kB 0 B
packages/node/dist/client.mjs 56.2 kB 0 B
packages/node/dist/entrypoints/index.edge.js 3.85 kB 0 B
packages/node/dist/entrypoints/index.edge.mjs 720 B 0 B
packages/node/dist/entrypoints/index.node.js 6.05 kB 0 B
packages/node/dist/entrypoints/index.node.mjs 1.43 kB 0 B
packages/node/dist/entrypoints/nestjs.js 2.31 kB 0 B
packages/node/dist/entrypoints/nestjs.mjs 42 B 0 B
packages/node/dist/experimental.js 870 B 0 B
packages/node/dist/experimental.mjs 267 B 0 B
packages/node/dist/exports.js 6.75 kB 0 B
packages/node/dist/exports.mjs 582 B 0 B
packages/node/dist/extensions/context/context.js 2.13 kB 0 B
packages/node/dist/extensions/context/context.mjs 863 B 0 B
packages/node/dist/extensions/context/types.js 603 B 0 B
packages/node/dist/extensions/context/types.mjs 0 B 0 B 🆕
packages/node/dist/extensions/error-tracking/autocapture.js 5.19 kB 0 B
packages/node/dist/extensions/error-tracking/autocapture.mjs 3.62 kB 0 B
packages/node/dist/extensions/error-tracking/index.js 4.38 kB 0 B
packages/node/dist/extensions/error-tracking/index.mjs 3.17 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/context-lines.node.js 11.6 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/context-lines.node.mjs 9.64 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/module.node.js 2.78 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/module.node.mjs 1.45 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/relative-path.node.js 1.97 kB 0 B
packages/node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs 624 B 0 B
packages/node/dist/extensions/express.js 4.97 kB 0 B
packages/node/dist/extensions/express.mjs 2.78 kB 0 B
packages/node/dist/extensions/feature-flags/cache.js 603 B 0 B
packages/node/dist/extensions/feature-flags/cache.mjs 0 B 0 B 🆕
packages/node/dist/extensions/feature-flags/crypto.js 1.27 kB 0 B
packages/node/dist/extensions/feature-flags/crypto.mjs 63 B 0 B
packages/node/dist/extensions/feature-flags/feature-flags.js 32.2 kB 0 B
packages/node/dist/extensions/feature-flags/feature-flags.mjs 29.8 kB 0 B
packages/node/dist/extensions/nestjs.js 5.62 kB 0 B
packages/node/dist/extensions/nestjs.mjs 3.42 kB 0 B
packages/node/dist/extensions/sentry-integration.js 4.88 kB 0 B
packages/node/dist/extensions/sentry-integration.mjs 3.36 kB 0 B
packages/node/dist/extensions/tracing-headers.js 3.31 kB 0 B
packages/node/dist/extensions/tracing-headers.mjs 1.53 kB 0 B
packages/node/dist/extensions/url-utils.js 2.22 kB 0 B
packages/node/dist/extensions/url-utils.mjs 785 B 0 B
packages/node/dist/feature-flag-evaluations.js 6.12 kB 0 B
packages/node/dist/feature-flag-evaluations.mjs 4.77 kB 0 B
packages/node/dist/gzip.node.js 1.74 kB 0 B
packages/node/dist/gzip.node.mjs 416 B 0 B
packages/node/dist/storage-memory.js 1.52 kB 0 B
packages/node/dist/storage-memory.mjs 297 B 0 B
packages/node/dist/types.js 1.43 kB 0 B
packages/node/dist/types.mjs 224 B 0 B
packages/node/dist/version.js 1.21 kB 0 B
packages/node/dist/version.mjs 46 B 0 B
packages/nuxt/dist/module.mjs 5.92 kB 0 B
packages/nuxt/dist/runtime/composables/useFeatureFlagEnabled.js 566 B 0 B
packages/nuxt/dist/runtime/composables/useFeatureFlagPayload.js 690 B 0 B
packages/nuxt/dist/runtime/composables/useFeatureFlagVariantKey.js 591 B 0 B
packages/nuxt/dist/runtime/composables/usePostHog.js 128 B 0 B
packages/nuxt/dist/runtime/nitro-plugin-v2.js 480 B 0 B
packages/nuxt/dist/runtime/nitro-plugin-v3.js 574 B 0 B
packages/nuxt/dist/runtime/nitro-plugin.js 1.03 kB 0 B
packages/nuxt/dist/runtime/vue-plugin.js 1.13 kB 0 B
packages/openfeature-node-provider/dist/index.js 1.76 kB 0 B
packages/openfeature-node-provider/dist/index.mjs 190 B 0 B
packages/openfeature-node-provider/dist/mapping.js 5.32 kB 0 B
packages/openfeature-node-provider/dist/mapping.mjs 3.21 kB 0 B
packages/openfeature-node-provider/dist/provider.js 3.99 kB 0 B
packages/openfeature-node-provider/dist/provider.mjs 2.6 kB 0 B
packages/openfeature-web-provider/dist/index.js 1.75 kB 0 B
packages/openfeature-web-provider/dist/index.mjs 184 B 0 B
packages/openfeature-web-provider/dist/mapping.js 5.29 kB 0 B
packages/openfeature-web-provider/dist/mapping.mjs 3.18 kB 0 B
packages/openfeature-web-provider/dist/provider.js 4.41 kB 0 B
packages/openfeature-web-provider/dist/provider.mjs 3.06 kB 0 B
packages/plugin-utils/dist/chunk-ids.js 3.86 kB 0 B
packages/plugin-utils/dist/chunk-ids.mjs 2.05 kB 0 B
packages/plugin-utils/dist/cli.js 4.37 kB 0 B
packages/plugin-utils/dist/cli.mjs 2.72 kB 0 B
packages/plugin-utils/dist/config.js 3.5 kB 0 B
packages/plugin-utils/dist/config.mjs 2.26 kB 0 B
packages/plugin-utils/dist/index.js 4.98 kB 0 B
packages/plugin-utils/dist/index.mjs 250 B 0 B
packages/plugin-utils/dist/spawn-local.js 3.08 kB 0 B
packages/plugin-utils/dist/spawn-local.mjs 1.66 kB 0 B
packages/plugin-utils/dist/utils.js 3.27 kB 0 B
packages/plugin-utils/dist/utils.mjs 1.3 kB 0 B
packages/react-native/dist/autocapture.js 8.31 kB 0 B
packages/react-native/dist/error-tracking/automatic-steps.js 3.83 kB 0 B
packages/react-native/dist/error-tracking/utils.js 2.58 kB 0 B
packages/react-native/dist/frameworks/wix-navigation.js 1.3 kB 0 B
packages/react-native/dist/hooks/useFeatureFlag.js 1.86 kB 0 B
packages/react-native/dist/hooks/useFeatureFlagResult.js 983 B 0 B
packages/react-native/dist/hooks/useFeatureFlags.js 941 B 0 B
packages/react-native/dist/hooks/useNavigationTracker.js 2.45 kB 0 B
packages/react-native/dist/hooks/usePostHog.js 544 B 0 B
packages/react-native/dist/hooks/utils.js 988 B 0 B
packages/react-native/dist/index.js 4.33 kB 0 B
packages/react-native/dist/logs-********.js 3.66 kB 0 B
packages/react-native/dist/native-deps.js 8.73 kB 0 B
packages/react-native/dist/optional/OptionalAsyncStorage.js 299 B 0 B
packages/react-native/dist/optional/OptionalExpoApplication.js 377 B 0 B
packages/react-native/dist/optional/OptionalExpoDevice.js 347 B 0 B
packages/react-native/dist/optional/OptionalExpoFileSystem.js 386 B 0 B
packages/react-native/dist/optional/OptionalExpoFileSystemLegacy.js 423 B 0 B
packages/react-native/dist/optional/OptionalExpoLocalization.js 383 B 0 B
packages/react-native/dist/optional/OptionalPlugin.js 891 B 0 B
packages/react-native/dist/optional/OptionalReactNativeDeviceInfo.js 415 B 0 B
packages/react-native/dist/optional/OptionalReactNativeLocalize.js 303 B 0 B
packages/react-native/dist/optional/OptionalReactNativeNavigation.js 415 B 0 B
packages/react-native/dist/optional/OptionalReactNativeNavigationWix.js 443 B 0 B
packages/react-native/dist/optional/OptionalReactNativeSafeArea.js 644 B 0 B
packages/react-native/dist/optional/OptionalReactNativeSvg.js 872 B 0 B
packages/react-native/dist/PostHogContext.js 329 B 0 B
packages/react-native/dist/PostHogErrorBoundary.js 3.19 kB 0 B
packages/react-native/dist/PostHogMaskView.js 1.68 kB 0 B
packages/react-native/dist/PostHogProvider.js 6 kB 0 B
packages/react-native/dist/storage.js 5.76 kB 0 B
packages/react-native/dist/surveys/components/BottomSection.js 1.51 kB 0 B
packages/react-native/dist/surveys/components/Cancel.js 1.1 kB 0 B
packages/react-native/dist/surveys/components/ConfirmationMessage.js 1.76 kB 0 B
packages/react-native/dist/surveys/components/IntroMessage.js 1.65 kB 0 B
packages/react-native/dist/surveys/components/QuestionHeader.js 1.47 kB 0 B
packages/react-native/dist/surveys/components/QuestionTypes.js 14 kB 0 B
packages/react-native/dist/surveys/components/SurveyModal.js 7.24 kB 0 B
packages/react-native/dist/surveys/components/Surveys.js 6.58 kB 0 B
packages/react-native/dist/surveys/getActiveMatchingSurveys.js 2.69 kB 0 B
packages/react-native/dist/surveys/icons.js 10 kB 0 B
packages/react-native/dist/surveys/index.js 600 B 0 B
packages/react-native/dist/surveys/PostHogSurveyProvider.js 6.73 kB 0 B
packages/react-native/dist/surveys/safeStyleSheet.js 448 B 0 B
packages/react-native/dist/surveys/survey-translations.js 1.11 kB 0 B
packages/react-native/dist/surveys/surveys-utils.js 11.5 kB 0 B
packages/react-native/dist/surveys/useActivatedSurveys.js 3.68 kB 0 B
packages/react-native/dist/surveys/useSurveyStorage.js 2.48 kB 0 B
packages/react-native/dist/tooling/expoconfig.js 23.6 kB 0 B
packages/react-native/dist/tooling/metroconfig.js 2.32 kB 0 B
packages/react-native/dist/tooling/posthogMetroSerializer.js 7.74 kB 0 B
packages/react-native/dist/tooling/utils.js 4.2 kB 0 B
packages/react-native/dist/tooling/vendor/expo/expoconfig.js 70 B 0 B
packages/react-native/dist/tooling/vendor/metro/countLines.js 237 B 0 B
packages/react-native/dist/tooling/vendor/metro/utils.js 3.51 kB 0 B
packages/react-native/dist/types.js 70 B 0 B
packages/react-native/dist/utils.js 1.3 kB 0 B
packages/react-native/dist/version.js 130 B 0 B
packages/react/dist/esm/index.js 22.5 kB 0 B
packages/react/dist/esm/slim/index.js 18.9 kB 0 B
packages/react/dist/esm/surveys/index.js 4.75 kB 0 B
packages/react/dist/umd/index.js 25.9 kB 0 B
packages/react/dist/umd/slim/index.js 21.8 kB 0 B
packages/react/dist/umd/surveys/index.js 5.52 kB 0 B
packages/rollup-plugin/dist/index.js 7.6 kB 0 B
packages/rrweb/all/dist/rrweb-all.cjs 705 kB 0 B
packages/rrweb/all/dist/rrweb-all.js 705 kB 0 B
packages/rrweb/all/dist/rrweb-all.umd.cjs 708 kB 0 B
packages/rrweb/all/dist/rrweb-all.umd.min.cjs 328 kB 0 B
packages/rrweb/packer/dist/base-********.cjs 18.3 kB 0 B
packages/rrweb/packer/dist/base-********.js 18.2 kB 0 B
packages/rrweb/packer/dist/base-********.umd.cjs 18.7 kB 0 B
packages/rrweb/packer/dist/base-********.umd.min.cjs 9.5 kB 0 B
packages/rrweb/packer/dist/pack.cjs 347 B 0 B
packages/rrweb/packer/dist/pack.js 285 B 0 B
packages/rrweb/packer/dist/pack.umd.cjs 1.63 kB 0 B
packages/rrweb/packer/dist/pack.umd.min.cjs 1.11 kB 0 B
packages/rrweb/packer/dist/packer.cjs 257 B 0 B
packages/rrweb/packer/dist/packer.js 136 B 0 B
packages/rrweb/packer/dist/packer.umd.cjs 662 B 0 B
packages/rrweb/packer/dist/packer.umd.min.cjs 626 B 0 B
packages/rrweb/packer/dist/unpack.cjs 769 B 0 B
packages/rrweb/packer/dist/unpack.js 702 B 0 B
packages/rrweb/packer/dist/unpack.umd.cjs 1.17 kB 0 B
packages/rrweb/packer/dist/unpack.umd.min.cjs 955 B 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.cjs 37.6 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.js 37.5 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.umd.cjs 38 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-record/dist/rrweb-plugin-canvas-webrtc-record.umd.min.cjs 22.2 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.cjs 34.3 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.js 34.2 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.umd.cjs 34.7 kB 0 B
packages/rrweb/plugins/rrweb-plugin-canvas-webrtc-replay/dist/rrweb-plugin-canvas-webrtc-replay.umd.min.cjs 20.5 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.cjs 15.8 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.js 15.7 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.umd.cjs 16.3 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.umd.min.cjs 7.66 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.cjs 5.01 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.js 4.9 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.umd.cjs 5.44 kB 0 B
packages/rrweb/plugins/rrweb-plugin-console-replay/dist/rrweb-plugin-console-replay.umd.min.cjs 2.64 kB 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.cjs 681 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.js 548 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.umd.cjs 1.12 kB 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-record/dist/rrweb-plugin-sequential-id-record.umd.min.cjs 829 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.cjs 933 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.js 820 B 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.umd.cjs 1.37 kB 0 B
packages/rrweb/plugins/rrweb-plugin-sequential-id-replay/dist/rrweb-plugin-sequential-id-replay.umd.min.cjs 968 B 0 B
packages/rrweb/record/dist/rrweb-record.cjs 234 kB 0 B
packages/rrweb/record/dist/rrweb-record.js 233 kB 0 B
packages/rrweb/record/dist/rrweb-record.umd.cjs 234 kB 0 B
packages/rrweb/record/dist/rrweb-record.umd.min.cjs 107 kB 0 B
packages/rrweb/replay/dist/rrweb-replay.cjs 476 kB 0 B
packages/rrweb/replay/dist/rrweb-replay.js 476 kB 0 B
packages/rrweb/replay/dist/rrweb-replay.umd.cjs 479 kB 0 B
packages/rrweb/replay/dist/rrweb-replay.umd.min.cjs 225 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.cjs 160 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.js 160 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.umd.cjs 162 kB 0 B
packages/rrweb/rrdom-nodejs/dist/rrdom-nodejs.umd.min.cjs 74.9 kB 0 B
packages/rrweb/rrdom/dist/rrdom.cjs 186 kB 0 B
packages/rrweb/rrdom/dist/rrdom.js 185 kB 0 B
packages/rrweb/rrdom/dist/rrdom.umd.cjs 187 kB 0 B
packages/rrweb/rrdom/dist/rrdom.umd.min.cjs 85.5 kB 0 B
packages/rrweb/rrweb-snapshot/dist/record.cjs 39 kB 0 B
packages/rrweb/rrweb-snapshot/dist/record.js 37.3 kB 0 B
packages/rrweb/rrweb-snapshot/dist/record.umd.cjs 83.2 kB 0 B
packages/rrweb/rrweb-snapshot/dist/record.umd.min.cjs 37.4 kB 0 B
packages/rrweb/rrweb-snapshot/dist/replay.cjs 149 kB 0 B
packages/rrweb/rrweb-snapshot/dist/replay.js 149 kB 0 B
packages/rrweb/rrweb-snapshot/dist/replay.umd.cjs 194 kB 0 B
packages/rrweb/rrweb-snapshot/dist/replay.umd.min.cjs 86.2 kB 0 B
packages/rrweb/rrweb-snapshot/dist/rrweb-********.cjs 3.95 kB 0 B
packages/rrweb/rrweb-snapshot/dist/rrweb-********.js 2.32 kB 0 B
packages/rrweb/rrweb-snapshot/dist/rrweb-********.umd.cjs 261 kB 0 B
packages/rrweb/rrweb-snapshot/dist/rrweb-********.umd.min.cjs 109 kB 0 B
packages/rrweb/rrweb-snapshot/dist/types-********.cjs 37.6 kB 0 B
packages/rrweb/rrweb-snapshot/dist/types-********.js 36.5 kB 0 B
packages/rrweb/rrweb-snapshot/dist/types-********.umd.cjs 39 kB 0 B
packages/rrweb/rrweb-snapshot/dist/types-********.umd.min.cjs 17.3 kB 0 B
packages/rrweb/rrweb/dist/rrweb.cjs 689 kB 0 B
packages/rrweb/rrweb/dist/rrweb.js 689 kB 0 B
packages/rrweb/rrweb/dist/rrweb.umd.cjs 689 kB 0 B
packages/rrweb/rrweb/dist/rrweb.umd.min.cjs 318 kB 0 B
packages/rrweb/types/dist/rrweb-types.cjs 5.75 kB 0 B
packages/rrweb/types/dist/rrweb-types.js 5.46 kB 0 B
packages/rrweb/types/dist/rrweb-types.umd.cjs 6.16 kB 0 B
packages/rrweb/types/dist/rrweb-types.umd.min.cjs 2.86 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.cjs 7.76 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.js 7.3 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.umd.cjs 8.24 kB 0 B
packages/rrweb/utils/dist/rrweb-utils.umd.min.cjs 4.09 kB 0 B
packages/types/dist/capture-log.js 603 B 0 B
packages/types/dist/capture-log.mjs 0 B 0 B 🆕
packages/types/dist/capture-metric.js 1.37 kB 0 B
packages/types/dist/capture-metric.mjs 93 B 0 B
packages/types/dist/capture.js 603 B 0 B
packages/types/dist/capture.mjs 0 B 0 B 🆕
packages/types/dist/common.js 603 B 0 B
packages/types/dist/common.mjs 0 B 0 B 🆕
packages/types/dist/feature-flags.js 603 B 0 B
packages/types/dist/feature-flags.mjs 0 B 0 B 🆕
packages/types/dist/index.js 1.45 kB 0 B
packages/types/dist/index.mjs 122 B 0 B
packages/types/dist/posthog-config.js 603 B 0 B
packages/types/dist/posthog-config.mjs 0 B 0 B 🆕
packages/types/dist/posthog.js 603 B 0 B
packages/types/dist/posthog.mjs 0 B 0 B 🆕
packages/types/dist/request.js 603 B 0 B
packages/types/dist/request.mjs 0 B 0 B 🆕
packages/types/dist/segment.js 603 B 0 B
packages/types/dist/segment.mjs 0 B 0 B 🆕
packages/types/dist/session-recording.js 603 B 0 B
packages/types/dist/session-recording.mjs 0 B 0 B 🆕
packages/types/dist/survey.js 603 B 0 B
packages/types/dist/survey.mjs 0 B 0 B 🆕
packages/types/dist/toolbar.js 603 B 0 B
packages/types/dist/toolbar.mjs 0 B 0 B 🆕
packages/types/dist/tree-shakeable.js 603 B 0 B
packages/types/dist/tree-shakeable.mjs 0 B 0 B 🆕
packages/web/dist/index.cjs 14 kB 0 B
packages/web/dist/index.mjs 14 kB 0 B
packages/webpack-plugin/dist/config.js 1.47 kB 0 B
packages/webpack-plugin/dist/config.mjs 480 B 0 B
packages/webpack-plugin/dist/index.js 7.39 kB 0 B
packages/webpack-plugin/dist/index.mjs 3.58 kB 0 B
tooling/changelog/dist/index.js 3.31 kB 0 B
tooling/rollup-utils/dist/index.js 1.17 kB 0 B

compressed-size-action

@marandaneto
marandaneto requested review from a team, ablaszkiewicz, cat-ph and hpouillot August 20, 2026 07:05
"path": "src/types.ts"
},
{
"id": "AutomaticExceptionStepsConfig",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we specialize the react native config for this as I don't think it applies to node ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, done in 4042b7d. AutomaticExceptionStepsOptions, the resolver and the $type vocabulary now live in packages/react-native/src/error-tracking/automatic-steps.ts. navigation, taps and lifecycle are signals React Native observes, so they had no business in a type posthog-node re-exports.

This file is back to what main has. Core now adds one field name and nothing else.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in 4042b7d, the rn config is specialised out of the node references. fine to resolve?

export const EXCEPTION_STEP_INTERNAL_FIELDS = {
TYPE: '$type',
MESSAGE: '$message',
LEVEL: '$level',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we use level anywhere ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, nothing writes it. I added $level only to mirror the field the error tracking timeline already reads, and this PR never sets it. I removed it in 4042b7d.

Core now adds only TYPE: '$type', which automatic steps do set. Neither field is reserved, so a caller can still categorise a manual step by hand.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in 4042b7d, $level is removed. fine to resolve?

@ioannisj ioannisj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a small comment on reset() behavior. Looks good to me otherwise, i'll leave the final approval for error tracking team since this is ultimately a product decision


Automatic steps carry `$type`, which the error tracking timeline already renders, and they share the byte-bounded buffer and the native forwarding that manual steps use. A manual step stays untyped. An event that `before_send` dropped leaves no step.

`reset()` now clears the exception-step buffer, for automatic and manual steps alike. Exception steps are user-session state, so on a shared device the previous user's screen names and tap labels must not reach the next user's exception. The buffer still survives a capture, so every exception in one session carries the same steps.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This leaves RN the odd one out from our SDKs? iirc, web and other mobile SDKs don't clear exception steps on reset.

This was previously discussed here.

For exception tracking I think steps should be scoped to app session and not user session. The whole idea isn't understanding user behavior, it's understanding app behavior, and user changing is part of a normal app flow. Losing the steps around a login or logout flow is losing exactly the context you'd want when something breaks there?

cc @hpouillot wdyt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, and I reverted it in 4042b7d. RN keeps steps across reset() again, so it matches web, iOS, Android and Flutter. I added a test that locks the behavior in, plus a comment on reset() so the next person does not clear it by accident.

Your app-behavior argument is the one that convinced me, and my privacy argument turned out weaker than I first thought. Automatic steps carry no $el_text and no touch coordinates, only structural labels like Screen: Cart and Tap: CheckoutButton, so what crossed the boundary was app shape rather than user content.

For context on why I touched it at all: the review bot flagged the shared-device case, and automatic steps do change the volume, because the buffer now fills on every screen change and tap instead of only where an app calls addExceptionStep. That is a difference in degree, not a reason to break consistency with four SDKs.

Two notes from the thread you linked, for whoever makes the call.

The identity-change question reads as open rather than settled. @hpouillot said "I think I would scope it to the session not the device", then "so ideally we reset the buffer when user changes", then "but I don't mind releasing a first version without". You said "I don't have a strong opinion tbh" and made the app-level argument, and he answered "Yes ok make sense". So the current behavior looks like the v1 choice, and hugues leaned the other way at the time.

There is also a middle option in that thread, and it is hugues's: "we could also create an automatic exception step 'user changed'?" You deferred it partly because you did not want to "mix up completely manual + semi-automatic api at the sdk level just yet". This PR adds exactly that semi-automatic API, so that objection has lapsed. An identity step at reset() keeps the login and logout context you want, and it marks the boundary so nobody reads user A's steps as user B's.

I am happy to add that step here, or to leave it out and keep this PR to automatic steps only. Your call, and hugues's.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that a "user changed" step would be valuable here as well, esp now that we're adding automatic exception steps

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up on this one, since it is the last thing holding the PR.

Your "I agree that a 'user changed' step would be valuable here as well" reads to me like a yes, but I do not want to assume it means in this PR. Shape I would add: a fourth opt-in signal identity, one step with $type: 'identity' and the message User changed, recorded at reset(), carrying no distinct ID.

That also closes the bot's open thread, which is the same question from the other side — it flagged that after reset() nothing in the timeline says the identity changed, so the previous user's steps read as the next user's. Keeping the steps and marking the boundary answers both.

In or out of this PR? Either is fine by me. @hpouillot, it was your idea originally, so shout if the shape is wrong.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

taking the quiet as no objection, so i'm adding the identity step here rather than splitting it out. it's small enough that it's easier to judge in code than in prose, and it's one revert if you'd rather this pr stayed narrow.

shape: a fourth opt-in signal identity, off unless enabled like the other three. on reset() it records one step, $type: 'identity', message User changed, no distinct id and no properties, emitted before super.reset() so it sits at the boundary rather than after it.

net effect: the buffer still survives reset(), so rn stays consistent with web, ios, android and flutter, and the timeline now marks where the identity changed instead of leaving the reader to infer it.

@hpouillot this was your idea in the original thread, so shout if the shape is wrong. otherwise i'll push it and this pr is done.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed in 57fe205. identity is opt-in like the other three, automatic: true turns it on with them. the existing reset test now asserts the boundary marker rather than a bare buffer survival, and there is a second test covering reset with identity off.

jakesciotto added a commit that referenced this pull request Aug 20, 2026
Address review on #4573.

1. Move the automatic-steps options, the resolver and the `$type` vocabulary
   out of `@posthog/core` and into the React Native package. `navigation`,
   `taps` and `lifecycle` are signals React Native observes, so they have no
   meaning in `posthog-node`, which re-exports core types. The node public API
   reference goes back to what main has.

2. Drop `LEVEL: '$level'` from `EXCEPTION_STEP_INTERNAL_FIELDS`. Nothing in
   this PR writes `$level`. Core now adds only `TYPE: '$type'`, which automatic
   steps do set.

3. Revert the `reset()` clear. Exception steps scope to the app session, not
   to the user session, so a logout keeps the steps that explain a failure in
   the logout flow itself. Every other SDK keeps them too. A test now locks the
   behavior in, and `reset()` carries a comment so nobody clears it by
   accident.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* @public
*/
reset(propertiesToKeep?: PostHogPersistedProperty[]): void {
// NOTE: reset() deliberately keeps the exception-step buffer. Steps scope to the app session, not

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Low: Exception steps cross user resets

reset() changes the active identity but now retains buffered screen names and tap labels. A subsequent user on the same device can trigger an exception that sends the previous user's activity under the new identity; clear the exception-step buffer at the start of reset() before calling super.reset().

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracking, but not changing it. You flagged this on the first commit, I did clear the buffer in reset(), and @ioannisj asked for that revert on review. Exception steps scope to the app session across every PostHog SDK, so clearing here would make React Native the only one that drops the steps explaining a failure in a login or logout flow.

The exposure is narrower than it reads. An automatic step carries no $el_text and no touch coordinates, only a structural label such as Screen: Cart or Tap: CheckoutButton, so what crosses the boundary is app shape rather than user content. A manual step can carry more, and the docs already tell callers to keep personal data out of step payloads.

The open follow-up is hugues's idea from the original design thread: record a "user changed" step at reset() instead of clearing. That keeps the login and logout context and marks the identity boundary in the timeline. That decision sits with the error tracking team, in the thread above.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the detail. I can't automatically confirm this is safe to dismiss, so I'm leaving the thread open for a maintainer to make the call.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will be closed by the identity step rather than by clearing the buffer. your concern was that after reset() nothing marks the identity change, so the previous user's steps read as the next user's. an explicit User changed step answers that while keeping the login and logout context that clearing would destroy. discussion is in the changeset thread above.

jakesciotto and others added 3 commits August 28, 2026 06:40
`addExceptionStep` shipped in 4.50.0, but every step is manual, so an
exception carries a timeline only where somebody added a call. Bugsnag and
Sentry leave breadcrumbs for navigation, taps and lifecycle on their own.

Set `errorTracking.exceptionSteps.automatic` to `true`, or to an object, to
record a step for a screen change, an autocaptured tap, or an app lifecycle
transition. Every signal stays off by default, because each step adds bytes
to every captured exception.

The recorder hangs off the existing `processBeforeEnqueue` chokepoint, which
already sees `$screen`, `$autocapture` and the lifecycle events, so nothing
new is patched or wrapped. Automatic steps share the byte-bounded buffer and
the native forwarding that manual steps use, so a native crash carries the
same timeline.

Automatic steps carry `$type`, which the error tracking timeline already
renders. `$type` and `$level` join `EXCEPTION_STEP_INTERNAL_FIELDS` in
`@posthog/core` to match that wire contract, and neither becomes reserved, so
a caller can still categorise a manual step. A manual step stays untyped.

An event that `before_send` dropped leaves no step: a caller drops an event to
keep data out of PostHog, so it must not reappear in an exception payload. A
tap step carries neither `$el_text` nor touch coordinates, because element
text is user-visible copy that can hold personal data.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`reset()` is the logout boundary, but the exception-step buffer survived it.
On a shared device the next user could trigger an exception that still carried
the previous user's screen names and tap labels. The buffer only cleared on
SDK close.

Automatic steps make this worse, because the buffer now fills on every screen
change and tap rather than only where an app calls `addExceptionStep`.

`reset()` now clears the buffer, for automatic and manual steps alike. The
clear runs outside the wrapped `super.reset()`, so a disabled client or a
client that is not yet initialized still drops the steps. A capture still
leaves the buffer intact, so every exception in one session carries the same
steps.

This reverses one line of the previous contract, which said the buffer clears
on SDK close and not on an identity change. `reset()` already clears
`SessionReplayEventTriggerActivatedSession` for the same reason, and
posthog-ios clears `_lastScreenName` in its own `reset()`.

The mirrored native buffer still survives a native reset. The plugin bridge
exposes only `addExceptionStep`, and `PostHogSDK.reset()` in posthog-ios does
not clear its buffer, so that half needs changes in posthog-ios,
posthog-android and @posthog/react-native-plugin.

Also commit the regenerated public API references, which `pnpm
check:public-api` requires to be current.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Address review on #4573.

1. Move the automatic-steps options, the resolver and the `$type` vocabulary
   out of `@posthog/core` and into the React Native package. `navigation`,
   `taps` and `lifecycle` are signals React Native observes, so they have no
   meaning in `posthog-node`, which re-exports core types. The node public API
   reference goes back to what main has.

2. Drop `LEVEL: '$level'` from `EXCEPTION_STEP_INTERNAL_FIELDS`. Nothing in
   this PR writes `$level`. Core now adds only `TYPE: '$type'`, which automatic
   steps do set.

3. Revert the `reset()` clear. Exception steps scope to the app session, not
   to the user session, so a logout keeps the steps that explain a failure in
   the logout flow itself. Every other SDK keeps them too. A test now locks the
   behavior in, and `reset()` carries a comment so nobody clears it by
   accident.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jakesciotto
jakesciotto force-pushed the feat/rn-automatic-exception-steps branch from 4042b7d to 731d230 Compare August 28, 2026 10:40
buildTapStep matched only `$event_type: 'touch'`, which was every interaction
autocapture emitted when this branch was written. Autocapture now also emits
`$event_type: 'click'` on React Native Web, so a click left no step and the
taps signal was silently dead on web.

Both types map to the `tap` step type, because they are one signal to a caller
who enabled `taps`. Only the message verb tells them apart.

Generated-By: PostHog Desktop
Task-Id: 2552bbac-84df-4d78-bcda-83bffa9890f1

Copy link
Copy Markdown
Contributor Author

Rebased onto main and fixed a regression the rebase surfaced.

The conflict was the example app. examples/example-expo-53 was removed on main and replaced by example-expo-57, and this branch wires the demo config into two files under the old path. Git's rename detection resolves it locally and carries the wiring into example-expo-57; GitHub's merge doesn't detect the rename across that many files, which is why the PR read as conflicting. Nothing was lost — the demo config now sits in examples/example-expo-57/posthog.ts.

The regression is worth a look, because it made the feature dead on web. buildTapStep matched only $event_type: 'touch', which was every interaction autocapture emitted when I wrote this. #4643 then added click autocapture for React Native Web, emitting $event_type: 'click'. So on RN Web a click recorded no step at all, and taps would have shipped silently doing nothing there.

Both types now map to the tap step type — they are one signal to a caller who enabled taps — and only the message verb tells them apart, so a mouse click reads Click: CheckoutButton rather than Tap:. Two tests cover the click path, and one covers an $autocapture event with no $event_type.

Full React Native suite passes (712), core passes (1037), lint and typecheck clean, references regenerated.


Still open: whether the "user changed" step lands here or follows. That is the only thing left, and it is a scope call rather than a code question, so I have not guessed at it.

Both open threads point at the same missing piece. @ioannisj asked to keep steps across reset() so a login or logout flow keeps its context, which I agree with and reverted to. The review bot's remaining thread is open on the flip side of exactly that: after reset() the timeline gives no sign the identity changed, so a reader can attribute the previous user's steps to the next one. A "user changed" step — @hpouillot's own suggestion from the original design thread — resolves both at once. It keeps the steps, and it marks the boundary so nobody misreads them.

Concretely I would add it as a fourth opt-in signal, identity, recording a step with $type: 'identity' and the message User changed at reset(). No distinct ID in the payload, since carrying one would reintroduce the concern the step exists to answer.

Happy either way — say the word and I add it here, or I ship this as automatic-signals-only and open a follow-up. This is otherwise ready.

…literal

An object literal keyed by a value read off event properties resolves
Object.prototype members, so an `$autocapture` event carrying
`$event_type: 'toString'` found a function rather than undefined, passed the
truthiness guard, and recorded a step whose message stringified that function.

A Map has no prototype chain to walk. Covered for the five Object.prototype
keys most likely to appear.

Generated-By: PostHog Desktop
Task-Id: 2552bbac-84df-4d78-bcda-83bffa9890f1
adds identity as a fourth opt-in automatic signal. on reset() it records one step, $type identity and message "User changed", before super.reset() so it sits on the boundary rather than after it. the step carries no distinct id, so it says the user changed without saying who either user was.

the buffer still survives reset(), keeping react native consistent with web, ios, android and flutter, and keeping the steps that explain a failure in a login or logout flow. marking the boundary is what stops the previous user's steps reading as the next user's, which clearing would have solved by deleting the context instead.

no enqueued event maps to identity, so buildIdentityExceptionStep sits outside buildAutomaticExceptionStep and the reset path calls it directly. the buffer-and-forward tail shared with the event path moves into recordAutomaticStep.

Generated-By: PostHog Desktop
Task-Id: e5eeb291-dc63-454b-8b53-384816ef6f78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants